import request from '@/utils/request'
import {xfdownload} from '@/utils/request'



// 查询稿频道或专题列表
export function channelList(query) {
    return request({
      url: '/didy/article/channel/list/'+query,
      method: 'get',
      params: query
    })
}

// 查询稿件列表
export function articleList(data) {
    return request({
      url: '/didy/article/list',
      method: 'post',
      data: data
    })
}

// 稿件更新列表
export function articleMove(data) {
    return request({
      url: '/didy/article/move',
      method: 'post',
      data: data
    })
}

// 稿件移动至
export function articleMoveTo(data) {
    return request({
      url: '/didy/article/moveTo',
      method: 'post',
      data: data
    })
}
// 稿件详情内下线
export function statusCancel(_id) {
  return request({
    url: '/didy/article/status/cancel/'+_id,
    method: 'get',
    data: _id
  })
}
// 批量下线
export function statusAllCancel(data) {
    return request({
      url: '/didy/article/status/cancel',
      method: 'post',
      data: data
    })
}
// 稿件详情内下线
// export function statusCancel(data) {
//   return request({
//     url: '/didy/article/status/cancel/'+data,
//     method: 'post',
//     data: data
//   })
// }
// (新增/复制)稿件
export function articleAdd(data) {
    return request({
      url: '/didy/article/add',
      method: 'post',
      data: data
    })
}

// 编辑稿件
export function articleEdit(data) {
    return request({
      url: '/didy/article/edit',
      method: 'post',
      data: data
    })
}
// 批量删除
export function articleDel(data) {
  return request({
    url: '/didy/article/del',
    method: 'post',
    data: data
  })
}
// 稿件详情
export function instance(data) {
    return request({
        url: '/didy/article/instance/'+data,
        method: 'get',
        // params: data
    })
}

// 获取日志明细
export function logList(data) {
    return request({
      url: '/didy/article/log/list/'+data,
      method: 'get',
      // data: data
    })
}
